package com.navi.loaddata.core.errorLog;

/**
 * Created by ghost on 2018/6/1.
 */
public enum  ErrorCode {
    //etlConfig
    ERROR_SHOP(10001,"EtlConfD SHOP 值 配置错误!"),
    ERROR_CELL_TYPE(10002,"EtlConfD CELL_TYPE 值 配置错误!"),
    ERROR_GET_RELOAD_JOB(10003,"EtlConfD 获取重跑JOB 配置错误!"),
    ERROR_RELOAD_JOB_ISRUNNING(10004,"EtlConfD 获取重跑JOB 配置 正在执行!"),
    ERROR_UPDATE_RELOAD_JOB(10005,"EtlConfD 修改重跑JOB 配置错误!"),
    ERROR_EXT2_MES_HIS_SPCDC(10006,"EtlConfD 没有配置EXT2"),
    ERROR_EXT3_MES_HIS_SPCDC(10007,"EtlConfD 没有配置EXT3"),

    //特殊异常
    ERROR_ORA_TEMP_TABLESPACE(99999,"临时表空间不足"),
    ERROR_SQL_CONNEECTION(99999,"数据库连接失败"),
    ERROR_CONNEECTION_TIME_OUT(99999,"数据库连接超时"),
    ERROR_GP_OUT_OF_MERMORY(99999,"数据库缓存溢出"),
    ERROR_TOO_MANY_CONNEECTION(99999,"数据库连接数不足"),


    //get info like 1%

    //EDA like 10%
    //loadMeasure like 100%
    ERROR_GET_GP_LAYOUT(100001,"从 GP数据库 获取转化 LAYOUT 资料错误。"),
    ERROR_GET_GP_STEP(100002,"从 GP数据库 获取 STEP信息 错误。"),
    ERROR_GET_GP_PRODUCT(100003,"从 GP数据库 获取 PRODUCT信息 错误。"),
    ERROR_GET_GP_GLASS(100004,"从 GP数据库 获取 DEFECT GLASS 资料错误。"),
    ERROR_GET_GP_PANEL(100005,"从 GP数据库 获取 DEFECT PANEL 资料错误。"),
    ERROR_GET_GP_DEFECT(100006,"从 GP数据库 获取 DEFECT DEFECT 资料错误。"),
    ERROR_GET_MYSQL_DEFECTCODE_TYPE(100007,"从 MYSQL数据库 获取 DEFECTCODE_TYPE 资料错误。"),
    //loadHis like 101%
    ERROR_GET_MES_HIS_TRACKOUT(101001,"从 MES数据库 获取 HIS GLASS_TRACKOUT 资料错误。"),
    ERROR_GET_MES_HIS_TRACKIN(101002,"从 MES数据库 获取 HIS GLASS_TRACKIN 资料错误。"),
    ERROR_GET_MES_HIS_ACF(101003,"从 MES数据库 MesCtPospairproduct 获取 ACF 资料错误。"),
    ERROR_GET_MES_HIS_OC(101004,"从 MES数据库 MesCtPospairproduct 获取 OC 资料错误。"),
    ERROR_GET_MES_HIS_CMN_GLASS(101005,"从 MES数据库 获取 COMMON_GLASS 资料错误。"),
    //loadpds like 102%
    ERROR_GET_MES_HIS_SPCDC(102001,"从 MES 数据库 获取 SPCDC 资料错误。"),
    ERROR_GET_MES_HIS_SPC_RESULT_DC_DCTYPE_I(102002,"从 MES 数据库 获取 SPC_RESULT_DC DCTYPE=I 资料错误。"),
    ERROR_GET_MES_HIS_SPC_RESULT_DC_DCTYPE_P(102003,"从 MES 数据库 获取 SPC_RESULT_DC DCTYPE=P 资料错误。"),
    ERROR_GET_MYSQL_PDS_CONF_D(102004,"从 MYSQL 数据库 获取 EDA_PDS_CONF_D 资料错误。"),
    ERROR_SET_MYSQL_PDS_CONF_D(102005,"MYSQL EDA_PDS_CONF_D 资料配置错误。"),
    ERROR_GET_MES_SPC_CHART_M(102006,"从 MES SPC_CHART_M_SHOP_EQPT 表获取资料错误。"),
    //loadTeg2 like 103%
    ERROR_GET_GP_TEG2(103001,"从 GP数据库 获取 TEG2 资料错误。"),
    ERROR_GET_GP_PARAM(103002,"从 GP数据库 获取 PARAM 资料错误。"),
    //OPEHIS like 104%
    //loadEqEVENT like 105%
    //loadChamberHst like 106%
    ERROR_GET_GP_CHAMBER_HST(106001,"从 GP数据库 获取转化 CHAMBER_HST 资料错误。"),
    //loadMapping like 107%
    ERROR_GET_GP_ARY_CF_MAPPING(107001,"从 GP数据库 获取 ARRAY_CF_MAPPING 资料错误。"),
    ERROR_GET_USER_INFO(107002,"从 USER数据库 获取 PANEL相关 资料错误。"),
    ERROR_GET_GP_CELL2_MAPPING(107003,"从 GP数据库 获取 CELL2_MAPPING 资料错误。"),

    //OPE_HIS like 11%
    ERROR_GET_GP_OPEHIS_OPE(110001,"从 GP数据库 获取 OPE 资料错误。"),
    ERROR_GET_GP_OPEHIS_PRODUCT(110002,"从 GP数据库 获取 PRODUCT 资料错误。"),
    ERROR_GET_MES_HIS_TRACTOUT(110003,"从 MES数据库 获取 HIS TRACKOUT 资料错误。"),
    ERROR_GET_GP_OPE_HIS_EXT(110004,"从 GP数据库 获取 OPE_HIS EXT 资料错误。"),
    ERROR_GET_GP_OPE_HIS_ASHT(110005,"从 GP数据库 获取 OPE_HIS ASHT 资料错误。"),
    ERROR_GET_GP_OPE_HIS_FSHT(110006,"从 GP数据库 获取 OPE_HIS FSHT 资料错误。"),
    ERROR_GET_GP_OPE_HIS_CSHT(110007,"从 GP数据库 获取 OPE_HIS CSHT 资料错误。"),
    ERROR_GET_MES_HIS_TRACTLN(110008,"从 MES数据库 获取 HIS TRACKOUT 对应的 TRACKIN 资料错误。"),
    ERROR_GET_MES_HIS_SHOP_STARTTIMESTAMP(110009,"从 MES数据库 获取 HIS TRACKOUT 对应的 SHOP_START_TIMESTAMP 资料错误。"),
    ERROR_GET_WMS_HIS_SHIP(110001,"从 WMS数据库 获取 HIS SHIP 资料错误。"),

    //Defect Summary获取数据 like 12%
    ERROR_GET_GP_DEFECT_OPE(120001,"从 GP数据库Defect表 获取 OpeList 资料错误。"),
    ERROR_GET_GP_DEFECT_TAB(120002,"从 GP数据库 获取 TabList 资料错误。"),
    ERROR_GET_GP_DEFECT_DATA(120003,"从 GP数据库 获取 Defect Data 资料错误。"),



    //PROCESS like 2%
    //EDA like 20%
    //LoadMeasure like 200%
    ERROR_PROCESS_GP2ORA_STEP(200002,"STEP信息 从GP转化到ORACLE 错误。"),
    ERROR_PROCESS_GP2ORA_PRODUCT(200003,"PRODUCT信息 从GP转化到ORACLE 错误。"),
    ERROR_PROCESS_GP2ORA_DEFECT_FILE(200004,"DEFECT FILE信息 从GP转化到ORACLE 错误。"),
//    ERROR_PROCESS_GP2ORA_GLASS(200004,"GLASS信息 从GP转化到ORACLE 错误。"),
//    ERROR_PROCESS_GP2ORA_PANEL(200005,"PANEL信息 从GP转化到ORACLE 错误。"),
//    ERROR_PROCESS_GP2ORA_DEFECT(200006,"DEFECT信息 从GP转化到ORACLE 错误。"),
    //LoadHis like 201%
    ERROR_PROCESS_GP2ORA_GLASS_HST(201001,"GLASS_HST 信息 从GP转化到ORACLE 错误。"),
    ERROR_PROCESS_GP2ORA_CMN_GLASS(201005,"CMN_GLASS 信息 从GP转化到ORACLE 错误。"),
    //LoadPDS like 202%
    ERROR_PROCESS_MES2ORA_PDS_GLASS(202001,"PDS_GLASS 信息 从MES转化到ORACLE 错误。"),
    ERROR_PROCESS_MES2ORA_PDS_GLASS_SUMMARY(202002,"PDS_GLASS_SUMMARY 信息 从MES转化到ORACLE 错误。"),
    ERROR_PROCESS_MES2ORA_PDS_GLASS_RESULT(202003,"PDS_GLASS_RESULT 信息 从MES转化到ORACLE 错误。"),
    //LoadTeg like 208%
    ERROR_PROCESS_GP2ORA_PARAM(208001,"PARAM 信息 从GP转化到ORACLE 错误。"),
    ERROR_PROCESS_GP2ORA_ARRAY_GLASS(208002,"TEG2 ARRAY_GLASS 信息 从GP转化到ORACLE 错误。"),
    ERROR_PROCESS_GP2ORA_ARRAY_IvCurve(208003,"TEG2 ARRAY_IvCurve 信息 从GP转化到ORACLE 错误。"),

    //save like 3%
    //EDA like 30%
    //LoadMeasure 300%
    ERROR_SAVE_ORA_STEPANDPRODUCT(300002,"STEP,PRODUCT信息 保存到 ORACLE 错误。"),
    ERROR_SAVE_ORA_DEFECT_FILE(300004,"DEFECT FILE信息 保存到 ORACLE 错误。"),
    //LoadHis like 301%
    ERROR_SAVE_ORA_GLASS_HST(301001,"GLASS_HST 信息 保存到 ORACLE 错误。"),
    ERROR_SAVE_ORA_HIS_CMN_GLASS(301005,"CMN_GLASS 信息 保存到 ORACLE 错误。"),
    //LoadPds like 302%
    ERROR_SAVE_ORA_PDS_GLASS(302001,"PDS_GLASS 信息 保存到 ORACLE 错误。"),
    //LoadTeg2 like 303%
    //LoadOpeHis like 304%
    //LoadEqState like 305%
    ERROR_SAVE_ORA_EQUIPEVENT(305001,"EQUIPEVENT 信息 保存到 ORACLE 错误。"),
    //loadChamberHst like 306%
    ERROR_SAVE_ORA_CHAMBER_HST(306001,"CHAMBER_HST 信息 保存到 ORACLE 错误。"),
    //loadMAPPING like 307%
    ERROR_SAVE_ORA_ACF_MAPPING(307001,"ACF_MAPPING 信息 保存到 ORACLE 错误。"),
    ERROR_SAVE_ORA_CELL_MAPPING(307002,"CELL_MAPPING 信息 保存到 ORACLE 错误。"),
    //loadTeg2 like 308%
    ERROR_SAVE_ORA_PARAM(308001,"PARAM 信息 保存到 ORACLE 错误。"),
    ERROR_SAVE_ORA_TEG2_ARY_GLASS(308002,"TEG2 ARY_GLASS 信息 保存到 ORACLE 错误。"),
    ERROR_SAVE_ORA_TEG2_ARY_IvCurve(308003,"TEG2 ARY_IvCurve 信息 保存到 ORACLE 错误。"),

    //Defect Summary表插入数据 like 31%
    ERROR_INSERT_GP_DEFECT_SUM(310001,"Defect Summary表 插入数据 错误"),

    //Defect Summary表删除数据 like 31%
    ERROR_DELETE_GP_DEFECT_SUM(310002,"Defect Summary表 删除数据 错误"),

    //获取MES Defect/Panel/Glass数据
    ERROR_GET_MES_DEFECT_INFO(320001,"从 MES数据库 获取 Defect 资料错误。"),
    ERROR_GET_MES_GLASS_INFO(320002,"从 MES数据库 获取 Glass 资料错误。"),

    //produce like 4%
    //EDA like 40%
    //LoadMeasure like 400%
    ERROR_PROCEDURE_ORA_STEP(400002,"调用 ORACLE STEP 存储过程 错误。"),
    ERROR_PROCEDURE_ORA_PRODUCT(400003,"调用 ORACLE PRODUCT 存储过程 错误。"),
    ERROR_PROCEDURE_ORA_DEFECT_FILE(400004,"调用 ORACLE DEFECT FILE 存储过程 错误。"),
    //LoadHis like 401%
    ERROR_PROCEDURE_ORA_GLASS_HST(401001,"调用 ORACLE GLASS_HST 存储过程 错误。"),
    ERROR_PROCEDURE_ORA_CMN_GLASS(401005,"调用 ORACLE CMN_GLASS 存储过程 错误。"),
    //LoadPds like 402%
    ERROR_PROCEDURE_ORA_PDS_GLASS(402001,"调用 ORACLE PDS_GLASS 存储过程 错误。"),
    //LoadTeg2 like 403%
    //LoadOpeHis like 404%
    //LoadEqState like 405%
    ERROR_PROCEDURE_ORA_EQUIPEVENT(405001,"调用 ORACLE EQUIPEVENT 存储过程 错误。"),
    //loadChamberHst like 406%
    ERROR_PROCEDURE_ORA_CHAMBER_HST(406001,"调用 ORACLE CHAMBER_HST 存储过程 错误。"),
    //loadTeg2 like 408%
    ERROR_PROCEDURE_ORA_PARAM(408001,"调用 ORACLE PARAM 存储过程 错误。"),
    ERROR_PROCEDURE_ORA_ARY_GLASS(408002,"调用 ORACLE DEFECT FILE 存储过程 错误。"),
    ERROR_PROCEDURE_ORA_ARY_IvCurve(4080032,"调用 ORACLE ARY_IvCurve 存储过程 错误。"),

    //delete like 5%
    //EDA like 50%
    //LoadMeasure like 500%
    ERROR_DELETE_ORA_DEFECT_FILE(500004,"删除 ORACLE DEFECT FILE 临时表 错误。"),
    //LoadHis like 501%
    ERROR_DELETE_ORA_GLASS_HST(501001,"删除 ORACLE GLASS_HST 临时表 错误。"),
    ERROR_DELETE_ORA_HIS_CMN_GLASS(501004,"删除 ORACLE CMN_GLASS 临时表 错误。"),
    //LoadPds like 502%
    ERROR_DELETE_ORA_PDS_GLASS(502001,"删除 ORACLE PDS_GLASS 临时表 错误。"),
    ERROR_DELETE_ORA_PARAM(508002,"删除 ORACLE PARAM 临时表 错误。"),
    //LoadTeg2 like 503%
    //LoadOpeHis like 504%
    //LoadEqState like 505%
    ERROR_DELETE_ORA_EQUIPEVENT(505001,"删除 ORACLE EQUIPEVENT 临时表 错误。"),
    //LoadChamberHst like 506%
    ERROR_DELETE_ORA_CHAMBER_HST(506001,"删除 ORACLE CHAMBER_HST 临时表 错误。"),
    //LoadChamberHst like 507%
    ERROR_DELETE_ORA_ACF_MAPPING(507001,"删除 ORACLE ACF_MAPPING 临时表 错误。"),
    ERROR_DELETE_ORA_CELL_MAPPING(507002,"删除 ORACLE CELL_MAPPING 临时表 错误。"),
    //loadTeg2 like 508%
    ERROR_DELETE_ORA_TEG2(508001,"删除 ORACLE TEG2 临时表 错误。"),
    ERROR_DELETE_ORA_TEG2_CMN(508002,"删除 ORACLE TEG2 CMN 临时表 错误。"),

    //rabbitMQ
    //OPE_HIS like 71%
    ERROR_RABBITMQ_OPEHIS_ASHT(710001,"ASHT 信息 发送 RABBITMQ 失败。"),
    ERROR_RABBITMQ_OPEHIS_FSHT(710002,"FSHT 信息 发送 RABBITMQ 失败。"),
    ERROR_RABBITMQ_OPEHIS_CSHT(710003,"CSHT 信息 发送 RABBITMQ 失败。"),
    //
    ERROR_RABBITMQ_MES_DEFECT(720001,"MES DEFECT 信息 发送 RABBITMQ 失败。"),
    ERROR_RABBITMQ_MES_GLASS(720002,"MES GLASS 信息 发送 RABBITMQ 失败。"),
    ERROR_RABBITMQ_GP_REALFLG(720003,"REAL_FLG更新 信息 发送 RABBITMQ 失败。"),

    // ope error
    ERROR_OPE_SQLEXCEPTION(800001, "OPE SQL执行异常"),
    // eqpt error
    ERROR_EQPT_SQLEXCEPTION(800002, "EQPT SQL执行异常"),
    // edc error
    ERROR_EDC_SQLEXCEPTION(800003, "EDC SQL执行异常"),
    // edc error
    ERROR_ADEFECT_SQLEXCEPTION(800004, "插入ADEFECT时语句执行异常"),


    //spc 多线程delete数据
    ERROR_DELETE_SPC_CHART(710003,"删除 GP SPC_CHART_ 表 错误。"),
    ;




    private int errorCode;
    private String errorMsg;

    private ErrorCode(int errorCode, String errorMsg){
        this.errorCode=errorCode;
        this.errorMsg=errorMsg;

    }

    public int getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }
}
